package com.laolu.icon;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

public class MainApplication extends Application {
	
	public static void main(String[] args) {
		initJacobConfig();
		launch();
	}
	
	private static void initJacobConfig() {
		String dllName = "64".equals(System.getProperty("sun.arch.data.model")) ? "jacob-1.21-x64.dll" : "jacob-1.21-x86.dll";
		String libsPath = System.getProperty("user.dir") + "/libs/";
		System.setProperty("jacob.dll.path", libsPath + dllName);
//		System.setProperty("com.jacob.debug","true");
	}
	
	@Override
	public void start(Stage stage) throws IOException {
		FXMLLoader loader = new FXMLLoader(getClass().getResource("main.fxml"));
		Scene scene = new Scene(loader.load(), 600, 400);
		stage.setScene(scene);
		stage.setTitle("title");
		stage.show();
	}
}
